/*
 * @Descripttion: 
 * @version: 
 * @Author: 高月飞
 * @Date: 2023-11-14 21:22:40
 * @LastEditors: 高月飞
 * @LastEditTime: 2023-11-26 12:35:18
 */
// mock一个用户数据
import { number } from 'echarts';
import Mock from 'mockjs'


  
export default [
    

    //销售趋势
    //销售数据上传
    {
        url: '/api/information/salestrend',
        method: 'get',
        response: ({ query }) => {
            console.log(query.page)
            let page = query.page || 1
            return {
                code: 0,
                msg: 'sucess',
                
                data:{
                    total:100,
                    ...Mock.mock({
                        'users|10':[{
                            'id|+1': page * 10,
                            //Time实现月份每次递增1
                            Time: '@date("yyyy-MM")',
                            // 'yearMonths|36': yearMonths,
                            SalesVolume: '@integer(350, 10000)',
                            SalesOrderQuantity: '@integer(0, 500)',
                            Target: '@integer(350, 10000)',
                            'CompletionRate': function()  {
                                return (this.SalesVolume / this.Target * 100).toFixed(2) + '%';
                            },
                            CollectionAmount: '@integer(200, 1000)',
                        }]
                        
                    })
                }
            }
        }
    },
        //天数据
        {
            url: '/api/information/salestrend/day',
            method: 'get',
            response: () => {
                return {
                    code: 200,
                    msg: 'sucess',
                   data :{
                        data1: [
                          { day: '周一', value: 200 },
                          { day: '周二', value: 300 },
                          { day: '周三', value: 400 },
                          { day: '周四', value: 410 },
                          { day: '周五', value: 450 },
                          { day: '周六', value: 550 },
                          { day: '周日', value: 1000 },
                        ],
                        data2: [
                          { day: '周一', value: 200 },
                          { day: '周二', value: 300 },
                          { day: '周三', value: 400 },
                          { day: '周四', value: 410 },
                          { day: '周五', value: 450 },
                          { day: '周六', value: 550 },
                          { day: '周日', value: 1000 },
                        ],
                      }
                }
            }
        }, 
        //周数据
        {
            url: '/api/information/salestrend/week',
            method: 'get',
            response: () => {
                return {
                    code: 200,
                    msg: 'sucess',
                   data :{
                        data1: [
                          { day: '第一周', value: 3100 },
                          { day: '第二周', value: 3220 },
                          { day: '第三周', value: 3400 },
                          { day: '第四周', value: 3410 },
                          { day: '第五周', value: 3450 },
                          
                        ],
                        data2: [
                            { day: '第一周', value: 4200 },
                            { day: '第二周', value: 3300 },
                            { day: '第三周', value: 3400 },
                            { day: '第四周', value: 4410 },
                            { day: '第五周', value: 4450 },
                        ],
                      }
                }
            }
        },
        //月数据
        {
            url: '/api/information/salestrend/mouth',
            method: 'get',
            response: () => {
                return {
                    code: 200,
                    msg: 'sucess',
                    data:{
                        data1: [
                            { day: '一月', value: 1400 },
                            { day: '二月', value: 2100 },
                            { day: '三月', value: 2800 },
                            { day: '四月', value: 2850 },
                            { day: '五月', value: 2900 },
                            { day: '六月', value: 3000 },
                            { day: '七月', value: 3100 },
                            { day: '八月', value: 3300 },
                            { day: '九月', value: 3600 },
                            { day: '十月', value: 3500 },
                            { day: '十一月', value: 3400 },
                            { day: '十二月', value: 3600 },
                        ],
                        data2: [
                            { day: '一月', value: 2400 },
                            { day: '二月', value: 3100 },
                            { day: '三月', value: 3800 },
                            { day: '四月', value: 3850 },
                            { day: '五月', value: 4000 },
                            { day: '六月', value: 4500 },
                            { day: '七月', value: 4600 },
                            { day: '八月', value: 5000 },
                            { day: '九月', value: 5500 },
                            { day: '十月', value: 6000 },
                            { day: '十一月', value: 6500 },
                            { day: '十二月', value: 6550 },
                          ],
                    } 
                        

                    
                }
            }
        }, 
    //销售排行
         //天数据
         {
            url: '/api/information/salesranking/day',
            method: 'get',
            response: () => {
                return {
                    code: 200,
                    msg: 'sucess',
                   data :{
                    data1: 
                        [
                            { name: '周尉鹏', value: 150 },
                            { name: '祝坤', value: 140 },
                            { name: '张子宽', value: 140 },
                            { name: '高月飞', value: 120 },
                            { name: '张三', value: 100 },
                            { name: '李四', value: 90 },
                            { name: '王五', value: 80 },
                            { name: '赵六', value: 70 },
                            { name: '王二麻子', value: 60 },
                          ],
                    data2:[
                        { name: '周尉鹏', value: 150 },
                        { name: '祝坤', value: 140 },
                        { name: '张子宽', value: 140 },
                        { name: '高月飞', value: 120 },
                        { name: '张三', value: 100 },
                        { name: '李四', value: 90 },
                        { name: '王五', value: 80 },
                        { name: '赵六', value: 70 },
                        { name: '王二麻子', value: 60 },
                      ],
                   }
                }
            }
        }, 
        //周数据
        {
            url: '/api/information/salesranking/week',
            method: 'get',
            response: () => {
                return {
                    code: 200,
                    msg: 'sucess',
                    data :{
                        data1:[
                            { name: '周尉鹏', value: 650 },
                            { name: '祝坤', value: 540 },
                            { name: '张子宽', value: 540 },
                            { name: '高月飞', value: 420 },
                            { name: '张三', value: 300 },
                            { name: '李四', value: 290 },
                            { name: '王五', value: 280 },
                            { name: '赵六', value: 170 },
                            { name: '王二麻子', value: 160 },
                          ],
                          data2:[
                            { name: '周尉鹏', value: 650 },
                            { name: '祝坤', value: 540 },
                            { name: '张子宽', value: 540 },
                            { name: '高月飞', value: 420 },
                            { name: '张三', value: 300 },
                            { name: '李四', value: 290 },
                            { name: '王五', value: 280 },
                            { name: '赵六', value: 170 },
                            { name: '王二麻子', value: 160 },
                          ],
                    }
                }
            }
        },
        //月数据
        {
            url: '/api/information/salesranking/month',
            method: 'get',
            response: () => {
                return {
                    code: 200,
                    msg: 'sucess',
                    data :{
                        data1:[
                            { name: '周尉鹏', value: 1150 },
                            { name: '祝坤', value: 1140 },
                            { name: '张子宽', value: 1140 },
                            { name: '高月飞', value: 1120 },
                            { name: '张三', value: 1100 },
                            { name: '李四', value: 190 },
                            { name: '王五', value: 180 },
                            { name: '赵六', value: 170 },
                            { name: '王二麻子', value: 160 },
                          ],
                          data2:[
                            { name: '周尉鹏', value: 1150 },
                            { name: '祝坤', value: 1140 },
                            { name: '张子宽', value: 1140 },
                            { name: '高月飞', value: 1120 },
                            { name: '张三', value: 1100 },
                            { name: '李四', value: 190 },
                            { name: '王五', value: 180 },
                            { name: '赵六', value: 170 },
                            { name: '王二麻子', value: 160 },
                          ],
                    }
                        

                    
                }
            }
        }, 
        //排名数据
        {
            url: '/api/information/salesranking/rank',
            method: 'get',
            response: ({ query }) => {
                console.log(query.page)
                let page = query.page || 1
                return {
                    code: 0,
                    msg: 'sucess',
                    
                    data:{
                        // total:100,
                        ...Mock.mock({
                            'A|10':[{
                                //写一个自增的num
                                num: '@increment(0,100)',
                                'id|+1': page * 10,
                                total:100,
                                //Time实现月份每次递增1
                                name: '@cname',
                                // 'yearMonths|36': yearMonths,
                                department: '市场一部',
                                Sales: '@integer(0, 200)',
                                SalesNumber: '@integer(10, 200)',
                                Target: '@integer(0, 200)',
                                'CompletionRate': function()  {
                                    return (this.Sales / this.Target * 100).toFixed(2) + '%';
                                }
                                
                            }],
                            'B|10':[{
                                num: '@increment(0,100)',
                                total:100,
                                'id|+1': page * 10,
                                //Time实现月份每次递增1
                                name: '@cname',
                                // 'yearMonths|36': yearMonths,
                                department: '市场二部',
                                Sales: '@integer(0, 200)',
                                SalesNumber: '@integer(10, 200)',
                                Target: '@integer(0, 200)',
                                'CompletionRate': function()  {
                                    return (this.Sales / this.Target * 100).toFixed(2) + '%';
                                }
                                 
                            }]
                            
                        })
                    }
                }
            }
        },
        
        //客户分析数据
        {
            url: '/api/information/customeranalysis/all',
            method: 'get',
            response: () => {
                
                return {
                    code: 0,
                    msg: 'sucess',
                    
                    data:{
                        
                        ...Mock.mock({
                            'client':[{
                                
                                
                                CustomerSource: '微信营销',
                                // 'yearMonths|36': yearMonths,
                                CustomerData: '@integer(350, 10000)',
                                PercentageofCustomers: '@integer(0, 500)',
                                
                            },
                            {
                                
                                
                                CustomerSource: '电话营销',
                                // 'yearMonths|36': yearMonths,
                                CustomerData: '@integer(350, 10000)',
                                PercentageofCustomers: '@integer(0, 500)',
                                
                            },
                            {
                                
                                
                                CustomerSource: '社群',
                                // 'yearMonths|36': yearMonths,
                                CustomerData: '@integer(350, 10000)',
                                PercentageofCustomers: '@integer(0, 500)',
                                
                            },
                            {
                                
                                
                                CustomerSource: '独立开发',
                                // 'yearMonths|36': yearMonths,
                                CustomerData: '@integer(350, 10000)',
                                PercentageofCustomers: '@integer(0, 500)',
                                
                            },
                            {
                                
                                
                                CustomerSource: '客户介绍',
                                // 'yearMonths|36': yearMonths,
                                CustomerData: '@integer(350, 10000)',
                                PercentageofCustomers: '@integer(0, 500)',
                                
                            },
                            {
                                
                                
                                CustomerSource: '信息流',
                                // 'yearMonths|36': yearMonths,
                                CustomerData: '@integer(350, 10000)',
                                PercentageofCustomers: '@integer(0, 500)',
                                
                            },
                            {
                                
                                
                                CustomerSource: 'SEM',
                                // 'yearMonths|36': yearMonths,
                                CustomerData: '@integer(350, 10000)',
                                PercentageofCustomers: '@integer(0, 500)',
                                
                            },
                            {
                                
                                
                                CustomerSource: '其他',
                                // 'yearMonths|36': yearMonths,
                                CustomerData: '@integer(350, 10000)',
                                PercentageofCustomers: '@integer(0, 500)',
                                
                            },
                            ]
                            
                        })
                    }
                }
            }
        },

        //部门业绩明细
        {
            url:'/api/information/departmentperf/data',
            method:'get',
            response:()=>{
                return{
                    code:200,
                    msg:'sucess',
                    data:{
                        total:100,
                        'data1':[{
                            Time:'2023-12',
                            Part:'市场一部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-11',
                            Part:'市场一部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-10',
                            Part:'市场一部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-09',
                            Part:'市场一部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-08',
                            Part:'市场一部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-07',
                            Part:'市场一部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-06',
                            Part:'市场一部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-05',
                            Part:'市场一部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-04',
                            Part:'市场一部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-03',
                            Part:'市场一部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-02',
                            Part:'市场一部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-01',
                            Part:'市场一部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                       
                        ],
                        'data2':[{
                            Time:'2023-12',
                            Part:'市场二部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-11',
                            Part:'市场二部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-10',
                            Part:'市场二部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-09',
                            Part:'市场二部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-08',
                            Part:'市场二部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-07',
                            Part:'市场二部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-06',
                            Part:'市场二部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-05',
                            Part:'市场二部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-04',
                            Part:'市场二部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-03',
                            Part:'市场二部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-02',
                            Part:'市场二部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                        {
                            Time:'2023-01',
                            Part:'市场二部',
                            Sales:'@integer(600,1000)',
                            SalesOrder:'@integer(50,100)',
                            Target:'@integer(600,1000)',
                            'CompletionRate':function(){
                                return(this.Sales / this.Target * 100).toFixed(2)+'%'
                            }
                        },
                       
                        ]
                    }
                       
                    
                }
            }
        }

]
